19. Hardware Related Commands > 19.3 AT^SBC   Battery Charge Control

19.3
AT^SBC   Battery Charge Control
The functions of the AT^SBC differ depending on whether or not a battery is present.
•
General functions:
The AT^SBC provides URCs used to alert the user of undervoltage and overvoltage conditions before the module switches off. The automatic shutdown caused by undervoltage or overvoltage is equivalent to the power-down initiated with the AT^SMSO command, i.e. ME logs off from the network and the software enters a secure state avoiding loss of data. When the module is in IDLE mode it takes typically one minute to dereg­ister from the network and to switch off. For further details regarding automatic shutdown and voltage ratings please refer to the Hardware Interface Description [2].
The URCs do not need to activated by the TE. They will be output automatically when fault conditions occur.
•
Functions available with battery connected:
The AT^SBC read command can be used to query the status of the battery and the charger.
The AT^SBC write command is important for entering the current consumption of the external application via <current>. It should be noted that the charge control supported by TC65 works only if the requirements described in the Hardware Interface Description [2] are met (battery type Lithium-Ion or Lithium Polymer, presence of an NTC and protection circuit etc.) and if <current> is correctly specified. If the battery does not incorporate an NTC, or the battery and the NTC are not compliant with the specified requirements the battery cannot be detected by TC65.
Syntax
Test Command  
Response(s)
^SBC:(list of supported <bcs>s), (list of supported <bcl>s), (list of supported <mpc>s)
Read Command  
Response(s)
Write Command  
Response(s)
Reference(s) 
PIN 
ASC0 
ASC1 
USB 
MUX1 
MUX2 
MUX3 
Charge 
Last 

Unsolicited Result Codes
URC 1
^SBC: Undervoltage
The message will be reported, for example, when the user attempts to set up a call while the voltage is close to the critical limit and further power loss is caused during the transmit burst. When the external charging cir­cuit includes an NTC connected to the BATT_TEMP pin, the URC appears several times before the module switches off.
In applications which are not battery operated, i.e. where no NTC is connected to the BATT_TEMP pin, TC65 will present the undervoltage URC only once and will then switch off without sending any further messages.
URC 2
^SBC: Overvoltage warning
This URC is an alarm indicator displayed when the supply voltage approaches its maximum level. The URC appears only once.
URC 3
^SBC: Overvoltage shutdown
This URC will be reported when the voltage exceeds the maximum level specified in the Hardware Interface Description [2]. It appears only once before the module starts to perform an orderly shutdown.
In applications powered from Lithium batteries the incorporated protection circuit typically prevents over­charging, thus eliminating the risk of overvoltage conditions. Yet, in case of charging errors, for example caused by a bad battery or due to the absence of a battery protection circuit, the module's overvoltage shut­down function will take effect to avoid overcharging.

Parameter Description
 
<bcs>(num)
Connection status of battery pack
0
No charging adapter is connected
1
Charging adapter is connected
2
Charging adapter is connected, charging in progress
3
Charging adapter is connected, charging has finished
4
Charging error, charging is interrupted
5
False charging temperature, charging is interrupted while temperature is beyond allowed range
 
<bcl>(num)
Battery capacity
0, 20, 40, 60, 80, 100 percent of remaining capacity (6 steps).
"0" indicates that either the battery is exhausted or the capacity value is not available. "100" indicates a remain­ing capacity between 81 and 100 percent, "80" indicates 61 ... 81 percent, and so on.
While charging is in progress (charging adapter connected) the battery capacity is not available. Consequently, parameter <bcl>=0. To query the battery capacity disconnect the charger.
 
<mpc>(num)
Current consumption of the host application as specified with parameter <current>.
 
0(P)...5000
Enter the current consumption of your host application in mA. This information enables TC65 to correctly determine the end of charging and terminate charg­ing automatically when the battery is fully charged. Note that if <current> is inaccurate, and the application draws a current higher than the final charge current, either charging will not be terminated or the battery fails to reach its maximum voltage. Therefore, the termination condition is defined as: current consumption dependent on operating mode of the ME plus current consump­tion of the external application. If used, the current flowing over the VEXT pin of the application interface must be added, too.
The specified value will also be displayed as parameter <mpc> of the AT^SBC read command.
When the TC65 is powered down or reset, the value of <current> is restored to its default. This affects the charging control. Therefore, the parameter should be set every time when needed after rebooting the TC65.


Notes
•
If multiplex mode (AT+CMUX) is active, any virtual channel can be used for entering the read or write com­mand. The undervoltage URC will be issued simultaneously on all three channels.
•
Another URC type required for battery powered applications is the URC "^SYSSTART CHARGE ONLY MODE". It is indicated automatically when the module enters this mode (except when autobauding is active). See AT+CFUN for details.